package dev.blogmoon.cn.common.typehandler;

import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;

import java.util.List;
import java.util.stream.Collectors;
@MappedJdbcTypes(JdbcType.VARCHAR)
@MappedTypes({List.class})
public class LongListTypeHandler extends ListTypeHandler<Long> {

    @Override
    protected List<Long> convertList(List<String> stringList) {
        return stringList.stream().map(Long::parseLong).collect(Collectors.toList());
    }
}
